<!-- FEATURED BOX --->
<?php
$listing_featured = $this->listing_model->get_listings('CAR', 0, 51, 5, 0);
$listing_featured_big = $listing_featured;
?>

<link rel="stylesheet" href="<?= base_url(); ?>third_party/agile_carousel/agile_carousel.css" type='text/css'>
<div class="slideshow" id="multiple_slides_visible"></div>
<script src="<?= base_url(); ?>third_party/agile_carousel/agile_carousel.alpha.js"></script>

<script>
    jQuery(function()
    {
        var data = [];
        jQuery(".featuredItem").each(function()
        {
            data.push({content:jQuery(this).html()});
        });
        $(".content2").agile_carousel({
            carousel_data: data,
            carousel_outer_height: 280,
            //carousel_height: 100,
            //carousel_width: 700,
            //slide_height: 100,
            slide_width: 174,
            transition_time: 0,
            timer: 3000,
            number_slides_visible: 1,
            continuous_scrolling: true,
            no_control_set: "hover_previous_button,hover_next_button"	
            
        });
    });
</script>

<div class="grid_6">
    <div class="tabs tabs_var2">
        <div class="grid_8 alpha" >
            <ul class="nav">
                <li class="selected" style="width:200px"><a href="#featured_car">Featured Cars</a></li>
            </ul>
            <div class="clear"></div>
        </div>

        <div class="omega">
            <a class="detail_search inline-block bold" href="#">See all</a>
        </div>
        <div class="clear"></div>

        <div class="tabs_1">
            <div id="featured_car" class="tab-content">
                <div class="inner" style="width:95%; height:312px; overflow: hidden" >
                    <div class="wrapper" >
                        <div class="grid_3 alpha omega" >

                            <?php foreach ($listing_featured as $listing_featured): ?>	

                                <div class="box_img_description border_bottom marg_bottom_zero">
                                    <div class="color_2 bold marg_bottom_zero">
                                        <a href="<?= base_url(); ?>view/detail/<?= strtolower(url_title($this->management_model->get_version('CAR', $listing_featured->version)->version)); ?>/<?= $listing_featured->id; ?>">
                                            <?= $this->management_model->get_version('CAR', $listing_featured->version)->version; ?> </a>
                                    </div>
                                    <p class=" color_4">
                                        <strong>Year: <?= $listing_featured->make_year; ?></strong>
                                        <span class="separator_vertical inline-block"></span>
                                        <span class="color_3">Rs. <strong><?= moneyFormat($listing_featured->price); ?></strong></span>
                                    </p> 

                                    <div class="clear"></div> 
                                </div>

                            <?php endforeach; ?>

                        </div>


                        <div id="flavor_2" class="content2">
                            <?php foreach ($listing_featured_big as $listing_featured_big): ?>	
                                <a href="#">
                                    <div class="featuredItem"  style="border:none">
                                        <div class="grid_3 alpha omega">
                                            <img style="max-height: 155px" src="<?= base_url(); ?>assets/images/data/car/version/<?= $this->management_model->get_version('CAR', $listing_featured_big->version)->image; ?>" alt=""><br>
                                            <p class="color_2 bold">
                                            <h3><?= $this->management_model->get_version('CAR', $listing_featured_big->version)->version; ?></h3>
                                            </p>
                                            <p class="font_1 inline-block">
                                                Labore et dolore magna aliqua. Ut enim<br> 
                                                ad minim veniam
                                            </p>
                                            <p class="bold color_4">
                                                Year: <?= $listing_featured_big->make_year; ?> <span class="separator_vertical inline-block"></span>Driven: <?= moneyFormat($listing_featured_big->km_done); ?> Kms.
                                            </p>
                                            <span class="color_3">Rs. <strong><?= moneyFormat($listing_featured_big->price); ?></strong></span>
                                        </div>
                                    </div>
                                </a>
                            <?php endforeach; ?>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>